#!/usr/bin/env python

import os, matplotlib, numpy, fcsextract, sys, cytomClasses
from matplotlib import pyplot

#takes in the description file as a command line arguement
tubeList = cytomClasses.importTubes(sys.argv[1])
print 'length of tubeList: ' + str(len(tubeList))
searchTerms = ['triplicateNumber', 'perturbant', 'chemical', 'strain']
searchValues = ['1', 'unk', 'a', '1']
myTubes = cytomClasses.returnTubes(searchTerms, searchValues, tubeList)
print 'length of myTubes: ' + str(len(myTubes))
values = []
concentration = []
for tube in myTubes:
	values.append(tube.medianFITC_A)
	concentration.append(tube.concentrations)
matplotlib.pyplot.plot(concentration, values, 'bo')
matplotlib.pyplot.savefig('test.png')
concentration.reverse()
matplotlib.pyplot.clf()
matplotlib.pyplot.cla()
matplotlib.pyplot.plot(concentration, values, 'bo')
matplotlib.pyplot.savefig('test2.png')